package com.liujit.bms.app.controller;

import com.liujit.bms.app.domain.result.BlogLabelResult;
import com.liujit.bms.app.service.BlogLabelService;
import com.liujit.bms.app.domain.query.BlogLabelQuery;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Description 博客标签管理接口
 * @Author liujun
 * @Date 2021-07-13 11:14:29
 */
@RequiredArgsConstructor
@Api(tags = "博客标签管理接口")
@RestController
@RequestMapping("/blog/label")
public class BlogLabelController {

    private final BlogLabelService blogLabelService;

    @ApiOperation(value = "列表查询", notes = "根据博客标签分页查询条件，分页查询博客标签列表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "query", value = "博客标签分页查询条件", dataType = "BlogLabelQuery", dataTypeClass = BlogLabelQuery.class, paramType = "query") })
    @GetMapping("/getList")
    public List<BlogLabelResult> getList(BlogLabelQuery query) {
        return blogLabelService.getList(query);
    }
}
